package copyengine.ui.infoTree.buildTree.builder
{
    import copyengine.infoTree.meta.CESTextFieldMeta;
    import copyengine.ui.display.textFiled.CETextFiled;
    import copyengine.ui.infoTree.buildTree.InfoTreeBuildUtils;

    import flash.utils.Dictionary;

    import starling.display.DisplayObject;

    public class InfoTreeBuilderTextFiled extends InfoTreeBuilderBasic
    {
        public function InfoTreeBuilderTextFiled()
        {
            super();
        }

        override public function isCanHandleMeta(_meta:*):Boolean {return _meta is CESTextFieldMeta;}

        override public function getBuildResultMc(_meta:*, _quickFindDic:Dictionary, _quickFindKeyPR:String, _isRoot:Boolean):DisplayObject
        {
            var meta:CESTextFieldMeta = _meta as CESTextFieldMeta;
            var tf:CETextFiled = new CETextFiled(meta);
            InfoTreeBuildUtils.setBasicInfoByMeta(meta, tf);
            InfoTreeBuildUtils.addToQuickFindDic(tf, _quickFindDic, _quickFindKeyPR, _isRoot);
            return tf;
        }
    }
}
